package com.hoshino.momochi.service.Impl;

import com.hoshino.momochi.mapper.SubscribeMapper;
import com.hoshino.momochi.model.domain.CollectionBlog;
import com.hoshino.momochi.model.domain.Subscribe;
import com.hoshino.momochi.service.SubscribeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubscribeServiceImpl implements SubscribeService {

    @Autowired
    private SubscribeMapper subscribeMapper;

    @Override
    public List<Subscribe> getUserSubscribeCollection(Long uid) {
        return subscribeMapper.getUserSubscribeCollection(uid);
    }

    @Override
    public List<CollectionBlog> getUserSubscribe(Long uid) {
        return subscribeMapper.getUserSubscribe(uid);
    }

    @Override
    public void addSubscribeCollection(Subscribe subscribe) {
        subscribeMapper.addSubscribeCollection(subscribe);
    }

    @Override
    public void delSubscribeCollection(Subscribe subscribe) {
        subscribeMapper.delSubscribeCollection(subscribe);
    }

    @Override
    public Long checkHaveSubscribe(Subscribe subscribe) {
        return subscribeMapper.checkHaveSubscribe(subscribe);
    }

    @Override
    public Long checkHaveCollection(Subscribe subscribe) {
        return subscribeMapper.checkHaveCollection(subscribe);
    }

    @Override
    public Long checkCollectionIsLife(Long cid) {
        return subscribeMapper.checkCollectionIsLife(cid);
    }

    @Override
    public void delIsDeleteAsTrue() {
        subscribeMapper.delIsDeleteAsTrue();
    }
}
